# -*- coding: utf-8 -*-
"""
 @Time    : 2021/1/28 下午5:29
 @Author  : tgy
 
"""

def test01():
    ...
    # 如果文件存在，报 FileExistsError异常
    try:
        with open('info.log',mode='xt',encoding='utf-8') as f:
            f.write('哈哈')
    except FileExistsError:
        print('文件存在')

if __name__ == '__main__':
    ...
    test01()
    # s = io.StringIO()
